<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>战略合作申请</title>
<link rel="stylesheet" type="text/css" href="/css/front/conn.css"/>
<link rel="stylesheet" type="text/css" href="/css/front/list-step1.css"/>
<link href="/css/validate.css" rel="stylesheet" type="text/css" />
<link href="/css/area-form.css" rel="stylesheet" type="text/css" />
<script src="/js/plugs/jquery.js"></script>
<script src="/js/admins/base.js"></script>
<script src="/js/plugs/validate.js"></script>
<script src="/js/plugs/jquery.selarea.js" type="text/javascript"></script>
<script type="text/javascript" src="/js/plugs/jquery.imgupload.js"></script>

<style type="text/css">
  .cor  li {
        margin-top: 20px;
        height: 50px;
        margin-bottom: 10px;
        width: 900px;
    }
    li input{
        float: left;
    }
.uploader_photo_tips{
    text-align: left;
}

.cor button.btn {
   margin: 30px 0 0 400px !important;
}

</style>

</head>

<body>
<!-- 头部导航开始 -->
{# include file="$tpl_root_path/front/public/_header.html" #}
<!-- 头部导航结束 -->


<!-- 合作begin -->
<div class="cor"  style="margin-top: 110px;">
    <p>战略合作申请</p>
    <form class="strategy" method="post"  action="" >
    <ul  >
        <li style="margin-top: 80px;">
            <div class="form-title"><i>*</i><span>公司名称：</span></div>
             <div class="form-content">
            <input type="text" name="corpName" id="corpName" defaultshow="2-30个字"   checkItem="isBlank:'T|请填写公司名称',computeChar:'>2<30|公司名称不足2个字,工程名称不能超过30个字',isSimple:'T|公司名称太过简单'" />
            </div>
        </li>

         <li class="clearfix" name="public" id="areatop" >
            <div class="form-title"><i>*</i><span>地址：</span></div>
            <div class="fo_con_cont">
                <div class="area_fo_list province_list" id="area_province" data-val="" ><div class="province" >{#if empty($province)#}全国/省区/直辖市{#else#}{#$province#}{#/if#}{#$province#}</div>
                    <div class="province_list_down province_data" style="z-index:200;">
                    </div>
                </div>

                <div class="area_fo_list province_list two_city" id="area_city"><div class="city">全部/市</div>
                    <div class="province_list_down city_data" style="z-index:200;" >

                    </div>
                </div>

                <div class="area_fo_list province_list  three_area" id="area_district"><div class="area">全部/县/区</div>
                    <div class="province_list_down area_data" style="z-index:200;">

                    </div>
                </div>
                <input type="hidden" id="hidden_countrycode" name="hidden_countrycode" value=""/>
                <input type="hidden" id="hidden_countryname" name="hidden_countryname" value=""/>
                <span class="form_tips"  style="color: red;display: none;">请选择地区！</span>
                <span class="vtips Validform_wrong"  style="color: red;display: none;"></span>
            </div>
        </li>

        <li>
            <div class="form-title"><i>*</i><span>详细地址：</span></div>
            <div class="form-content">
                <input   type="text" name="address" id="address" placeholder="详细地址" defaultshow="2-60个字" maxlength="120" checkItem="isBlank:'T| 请输入详细地址',computeChar:'>2<60|字数必须在2-60之内'" />
            </div>
        </li>

        <li class="form-group">
            <div class="form-title"><i>*</i><span>上传营业执照：</span></div>
            <div class="col-sm-10 form-content">
                <div class="clearfix">
                    <div  id="imgup"></div>
                    <span class="news_tips image_tip form_tips form_error_tips" style="display:none;"></span><a>&nbsp;</a>
                </div>
            </div>
        </li>

        <li>
            <div class="form-title"><i>*</i><span>法人姓名：</span></div>
            <div class="form-content">
            <input type="text" name="principal" defaultshow="2-24个字"   checkItem="isBlank:'T|请填写法人姓名',computeChar:'>2<24|法人姓名不足2个字,法人姓名不能超过24个字',isSimple:'T|法人姓名太过简单'" />
            </div>
        </li>
        
        <li>
            <div class="form-title"><i>*</i><span>法人手机：</span></div>
            <div class="form-content">
            <input type="text" name="principal_mobile" defaultshow="请输入手机" checkitem="isBlank:'T|请填写手机号码',checkMobile:'F|手机号码格式错误'" maxlength="11" />
            </div>
        </li>
        
        <li>
            <div class="form-title"><i>*</i><span>业务联系人：</span></div>
            <div class="form-content">
            <input type="text" name="linkman"  defaultshow="2-24个字"  checkItem="isBlank:'T|请填写您的姓名',computeChar:'>2<24|您的姓名不足2个字,您的姓名不能超过24个字',isSimple:'T|业务联系人太过简单'" />
            </div>
        </li>
        
        <li>
            <div class="form-title"><i>*</i><span>联系电话：</span></div>
            <div class="form-content">
            <input type="text" name="tel"  defaultshow="请输入电话"  checkitem="isBlank:'T|请填写联系电话',checkPhone:'F|F|电话格式错误'" />
            </div>
        </li>
        
        <li>
            <div class="form-title"><i>*</i><span>手机：</span></div>
            <div class="form-content">
            <input type="text" name="mobile" defaultshow="请输入手机" checkitem="isBlank:'T|请填写手机号码',checkMobile:'F|手机号码格式错误'" maxlength="11" />
            </div>
        </li>
        
        <li>
            <div class="form-title"><i>*</i><span>邮箱：</span></div>
             <div class="form-content">
            <input type="text" name="email" defaultshow="请输入邮箱" checkitem="isBlank:'T|请填写邮箱',checkMail:'F|F|邮箱格式错误'" maxlength="50" />
            </div>
        </li>
        
    </ul>
    <button class="btn" type="submit" name="strategy"  value="1" onclick="return checkSubmit()">提交</button>
    </form>
</div>
<!-- 合作over -->









<!-- 咨询栏begin -->
{# include file="$tpl_root_path/front/public/_contact.html" #}

<!-- 咨询栏over -->



<!-- 底部begin -->
{# include file="$tpl_root_path/front/public/_footer.html" #}
<!-- 底部over -->



</body>
</html>

<script type="text/javascript">



    //图片上传

    {# if  $imgjs #}

    {#$imgjs#}

    {#else#}
    $.imgUploader({
        containerid:'imgup',
        dir:'news',
        img_cnt_limit:1,
        max_file_size:1024,
        prevent_duplicates:1,
        extensions:'jpg,jpeg,gif,png',
        multi_selection:true,
        min_img_width:0,
        min_img_height:0,
        single_file:true
    });
    {#/if#}

    $("#imgup").bind("UploadComplete",function() {
        $('.form_tips').addClass(" form-ok").css("display","inline-block");
    });


    //地理位置初始化及即时验证

    $.SELAREA({
        provinceId:"area_province",
        cityId:"area_city",
        districtId:"area_district",
        areacode:"{#$data.COUNTRYCODE#}",
        provinceFirst: '省区/直辖市',   //省级选择框默认显示文字
        cityFirst : '市',             //市级选择框默认显示文字
        districtFirst : '县/区',       //县区级选择框默认显示文字
        includeCountry: false,              //省级选择框是否包含全国选项
        rmCityNo1 : true,                //是否生成市级选择框第一项
    });

    $('#area_province').mouseleave(function(){
        $('.province_data').css('display','none');
    })

    $('#area_city').mouseleave(function(){
        $('.city_data').css('display','none');
    })


    $('#area_district').mouseleave(function(){
        $('.area_data').css('display','none');
    })


    $('#area_province').parent().bind('areaChange',function(){
        var pro=$('#area_province');
        var city=$('#area_city');
        var dis=$('#area_district');


        //绑定代码
        var areaid=dis.data('val')? dis.data('val'):(city.data('val')?city.data('val'):pro.data('val'));
        $('#hidden_countrycode').val(areaid);

        //绑定地区名称
        var address='';
        if (pro.data('val')!=="")
        {
            address = pro.find('div:first').html();
        }
        if (city.data('val')!==""&&city.find('div:last').find('a').size()>2)
        {
            address += city.find('div:first').html();
        }
        if (dis.data('val')!=="")
        {
            address += dis.find('div:first').html();
        }
        $('#hidden_countryname').val(address);

        if(areaid.toString().length == 12)
            $('#area_province').parent().find('.form_tips').removeClass('form_tips form_error_tips form-no').addClass(' form_success_tips form-ok').html('').css('display','inline-block');
        else{
            var exArr=[107101,107101101,108101,108101101,109101,109101101];
            var n=$.inArray(parseInt(areaid),exArr);
            if(n!==-1){
                $('#area_province').parent().find('form_tips').removeClass('form_tips form_error_tips form-no').addClass(' form_success_tips form-ok').html('').css('display','inline-block');
            }else{
                $('#area_province').parent().find('span').removeClass('form_tips form_success_tips form-ok').addClass('form_tips form-no').html('请选择地理位置').css('display','inline-block');
            }
        }

        $("#area_district").siblings(".vtips").hide()
    });













    function checkSubmit(){

        if(!validate())
            return false;

        //验证地址
        var areaid = $("#hidden_countrycode").val();
        if(areaid.length < 12){
            var exArr=[107101,107101101,108101,108101101,109101,109101101];
            var n=$.inArray(parseInt(areaid),exArr);
            if(n===-1) {
                $("#area_district").siblings(".vtips").html('请选择地区').addClass("form-no").css('display', 'inline-block').css('color','red').siblings('.form_tips').hide();
                $(window).scrollTop($("#corpName").parents("li").position().top);
                return false;
            }
        }


        //验证产品图片
        var pic = $("#imgup_filelist").html();
        if(pic == ''){
            $(window).scrollTop($("#address").parents('li').position().top);
            $('.image_tip').removeClass('Validform_right').addClass("form-no").css("display","inline-block").text('请上传图片');
            //$('#imgup').parent().find('span').removeClass('Validform_right').addClass("form-no").css("display","inline-block").text('请上传图片');
            return false;
        }else {
            $('.image_tip').removeClass('form-no').addClass("form-ok").css("display","inline-block").text(' ');
        }





    }








</script>